/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package co.com.entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author 841756
 */
@Entity
@Table(name = "tblcompania")
@NamedQueries({
    @NamedQuery(name = "Tblcompania.findAll", query = "SELECT t FROM Tblcompania t"),
    @NamedQuery(name = "Tblcompania.findByCodCompania", query = "SELECT t FROM Tblcompania t WHERE t.codCompania = :codCompania"),
    @NamedQuery(name = "Tblcompania.findByNomNomina", query = "SELECT t FROM Tblcompania t WHERE t.nomNomina = :nomNomina"),
    @NamedQuery(name = "Tblcompania.findByNit", query = "SELECT t FROM Tblcompania t WHERE t.nit = :nit"),
    @NamedQuery(name = "Tblcompania.findByObjSocial", query = "SELECT t FROM Tblcompania t WHERE t.objSocial = :objSocial"),
    @NamedQuery(name = "Tblcompania.findByDireccion", query = "SELECT t FROM Tblcompania t WHERE t.direccion = :direccion"),
    @NamedQuery(name = "Tblcompania.findByTelefono1", query = "SELECT t FROM Tblcompania t WHERE t.telefono1 = :telefono1"),
    @NamedQuery(name = "Tblcompania.findByTelefono2", query = "SELECT t FROM Tblcompania t WHERE t.telefono2 = :telefono2"),
    @NamedQuery(name = "Tblcompania.findByFax", query = "SELECT t FROM Tblcompania t WHERE t.fax = :fax"),
    @NamedQuery(name = "Tblcompania.findByAaereo", query = "SELECT t FROM Tblcompania t WHERE t.aaereo = :aaereo"),
    @NamedQuery(name = "Tblcompania.findByEmail", query = "SELECT t FROM Tblcompania t WHERE t.email = :email"),
    @NamedQuery(name = "Tblcompania.findByNumCuenta", query = "SELECT t FROM Tblcompania t WHERE t.numCuenta = :numCuenta"),
    @NamedQuery(name = "Tblcompania.findBySalMinimo", query = "SELECT t FROM Tblcompania t WHERE t.salMinimo = :salMinimo"),
    @NamedQuery(name = "Tblcompania.findBySubTransporte", query = "SELECT t FROM Tblcompania t WHERE t.subTransporte = :subTransporte"),
    @NamedQuery(name = "Tblcompania.findByDiasClave", query = "SELECT t FROM Tblcompania t WHERE t.diasClave = :diasClave")})
public class Tblcompania implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 6)
    @Column(name = "cod_compania")
    private String codCompania;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "nom_nomina")
    private String nomNomina;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nit")
    private int nit;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "obj_social")
    private String objSocial;
    @Size(max = 100)
    @Column(name = "direccion")
    private String direccion;
    @Size(max = 50)
    @Column(name = "telefono1")
    private String telefono1;
    @Size(max = 50)
    @Column(name = "telefono2")
    private String telefono2;
    // @Pattern(regexp="^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$", message="Invalid phone/fax format, should be as xxx-xxx-xxxx")//if the field contains phone or fax number consider using this annotation to enforce field validation
    @Size(max = 15)
    @Column(name = "fax")
    private String fax;
    @Size(max = 12)
    @Column(name = "aaereo")
    private String aaereo;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
    @Size(max = 40)
    @Column(name = "email")
    private String email;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 12)
    @Column(name = "num_cuenta")
    private String numCuenta;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "sal_minimo")
    private String salMinimo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "sub_transporte")
    private String subTransporte;
    @Column(name = "dias_clave")
    private Integer diasClave;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltipocontrato> tbltipocontratoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblconceptospermanentes> tblconceptospermanentesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblarp> tblarpList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblgrupo> tblgrupoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbldivisiones> tbldivisionesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<TblUsuario> tblUsuarioList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltipoprima> tbltipoprimaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblcajacompensacion> tblcajacompensacionList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblnovedades> tblnovedadesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbldeduccionretefuente> tbldeduccionretefuenteList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCom")
    private List<Tbltiponomina> tbltiponominaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblcargos> tblcargosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblconceptocuenta> tblconceptocuentaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblretefuente> tblretefuenteList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblfondopension> tblfondopensionList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblincapacidades> tblincapacidadesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblcentrocosto> tblcentrocostoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblconceptodeduccionretefuente> tblconceptodeduccionretefuenteList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblconceptos> tblconceptosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblfactoresprovision> tblfactoresprovisionList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltipoconceptos> tbltipoconceptosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblprestamos> tblprestamosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltipoactividad> tbltipoactividadList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblconceptoagrupacion> tblconceptoagrupacionList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblagrupacion> tblagrupacionList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblcesantias> tblcesantiasList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblparametroslegales> tblparametroslegalesList;
    @JoinColumn(name = "periodo_pago", referencedColumnName = "cod_periodo")
    @ManyToOne(optional = false)
    private Tblperiodopago periodoPago;
    @JoinColumn(name = "pais", referencedColumnName = "cod_pais")
    @ManyToOne(optional = false)
    private Tblpaises pais;
    @JoinColumn(name = "impuesto", referencedColumnName = "cod_impuesto")
    @ManyToOne(optional = false)
    private Tblimpuestos impuesto;
    @JoinColumn(name = "departamento", referencedColumnName = "cod_departamento")
    @ManyToOne(optional = false)
    private Tbldepartamentos departamento;
    @JoinColumn(name = "ciudad", referencedColumnName = "cod_ciudad")
    @ManyToOne(optional = false)
    private Tblciudades ciudad;
    @JoinColumn(name = "banco", referencedColumnName = "cod_banco")
    @ManyToOne(optional = false)
    private Tblbancos banco;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tblclaseempleados> tblclaseempleadosList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltercero> tblterceroList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tblcompania")
    private List<Tbldatospersonales> tbldatospersonalesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbltipoincapacidad> tbltipoincapacidadList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "codCompania")
    private List<Tbleps> tblepsList;

    public Tblcompania() {
    }

    public Tblcompania(String codCompania) {
        this.codCompania = codCompania;
    }

    public Tblcompania(String codCompania, String nomNomina, int nit, String objSocial, String numCuenta, String salMinimo, String subTransporte) {
        this.codCompania = codCompania;
        this.nomNomina = nomNomina;
        this.nit = nit;
        this.objSocial = objSocial;
        this.numCuenta = numCuenta;
        this.salMinimo = salMinimo;
        this.subTransporte = subTransporte;
    }

    public String getCodCompania() {
        return codCompania;
    }

    public void setCodCompania(String codCompania) {
        this.codCompania = codCompania;
    }

    public String getNomNomina() {
        return nomNomina;
    }

    public void setNomNomina(String nomNomina) {
        this.nomNomina = nomNomina;
    }

    public int getNit() {
        return nit;
    }

    public void setNit(int nit) {
        this.nit = nit;
    }

    public String getObjSocial() {
        return objSocial;
    }

    public void setObjSocial(String objSocial) {
        this.objSocial = objSocial;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelefono1() {
        return telefono1;
    }

    public void setTelefono1(String telefono1) {
        this.telefono1 = telefono1;
    }

    public String getTelefono2() {
        return telefono2;
    }

    public void setTelefono2(String telefono2) {
        this.telefono2 = telefono2;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getAaereo() {
        return aaereo;
    }

    public void setAaereo(String aaereo) {
        this.aaereo = aaereo;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNumCuenta() {
        return numCuenta;
    }

    public void setNumCuenta(String numCuenta) {
        this.numCuenta = numCuenta;
    }

    public String getSalMinimo() {
        return salMinimo;
    }

    public void setSalMinimo(String salMinimo) {
        this.salMinimo = salMinimo;
    }

    public String getSubTransporte() {
        return subTransporte;
    }

    public void setSubTransporte(String subTransporte) {
        this.subTransporte = subTransporte;
    }

    public Integer getDiasClave() {
        return diasClave;
    }

    public void setDiasClave(Integer diasClave) {
        this.diasClave = diasClave;
    }

    public List<Tbltipocontrato> getTbltipocontratoList() {
        return tbltipocontratoList;
    }

    public void setTbltipocontratoList(List<Tbltipocontrato> tbltipocontratoList) {
        this.tbltipocontratoList = tbltipocontratoList;
    }

    public List<Tblconceptospermanentes> getTblconceptospermanentesList() {
        return tblconceptospermanentesList;
    }

    public void setTblconceptospermanentesList(List<Tblconceptospermanentes> tblconceptospermanentesList) {
        this.tblconceptospermanentesList = tblconceptospermanentesList;
    }

    public List<Tblarp> getTblarpList() {
        return tblarpList;
    }

    public void setTblarpList(List<Tblarp> tblarpList) {
        this.tblarpList = tblarpList;
    }

    public List<Tblgrupo> getTblgrupoList() {
        return tblgrupoList;
    }

    public void setTblgrupoList(List<Tblgrupo> tblgrupoList) {
        this.tblgrupoList = tblgrupoList;
    }

    public List<Tbldivisiones> getTbldivisionesList() {
        return tbldivisionesList;
    }

    public void setTbldivisionesList(List<Tbldivisiones> tbldivisionesList) {
        this.tbldivisionesList = tbldivisionesList;
    }

    public List<TblUsuario> getTblUsuarioList() {
        return tblUsuarioList;
    }

    public void setTblUsuarioList(List<TblUsuario> tblUsuarioList) {
        this.tblUsuarioList = tblUsuarioList;
    }

    public List<Tbltipoprima> getTbltipoprimaList() {
        return tbltipoprimaList;
    }

    public void setTbltipoprimaList(List<Tbltipoprima> tbltipoprimaList) {
        this.tbltipoprimaList = tbltipoprimaList;
    }

    public List<Tblcajacompensacion> getTblcajacompensacionList() {
        return tblcajacompensacionList;
    }

    public void setTblcajacompensacionList(List<Tblcajacompensacion> tblcajacompensacionList) {
        this.tblcajacompensacionList = tblcajacompensacionList;
    }

    public List<Tblnovedades> getTblnovedadesList() {
        return tblnovedadesList;
    }

    public void setTblnovedadesList(List<Tblnovedades> tblnovedadesList) {
        this.tblnovedadesList = tblnovedadesList;
    }

    public List<Tbldeduccionretefuente> getTbldeduccionretefuenteList() {
        return tbldeduccionretefuenteList;
    }

    public void setTbldeduccionretefuenteList(List<Tbldeduccionretefuente> tbldeduccionretefuenteList) {
        this.tbldeduccionretefuenteList = tbldeduccionretefuenteList;
    }

    public List<Tbltiponomina> getTbltiponominaList() {
        return tbltiponominaList;
    }

    public void setTbltiponominaList(List<Tbltiponomina> tbltiponominaList) {
        this.tbltiponominaList = tbltiponominaList;
    }

    public List<Tblcargos> getTblcargosList() {
        return tblcargosList;
    }

    public void setTblcargosList(List<Tblcargos> tblcargosList) {
        this.tblcargosList = tblcargosList;
    }

    public List<Tblconceptocuenta> getTblconceptocuentaList() {
        return tblconceptocuentaList;
    }

    public void setTblconceptocuentaList(List<Tblconceptocuenta> tblconceptocuentaList) {
        this.tblconceptocuentaList = tblconceptocuentaList;
    }

    public List<Tblretefuente> getTblretefuenteList() {
        return tblretefuenteList;
    }

    public void setTblretefuenteList(List<Tblretefuente> tblretefuenteList) {
        this.tblretefuenteList = tblretefuenteList;
    }

    public List<Tblfondopension> getTblfondopensionList() {
        return tblfondopensionList;
    }

    public void setTblfondopensionList(List<Tblfondopension> tblfondopensionList) {
        this.tblfondopensionList = tblfondopensionList;
    }

    public List<Tblincapacidades> getTblincapacidadesList() {
        return tblincapacidadesList;
    }

    public void setTblincapacidadesList(List<Tblincapacidades> tblincapacidadesList) {
        this.tblincapacidadesList = tblincapacidadesList;
    }

    public List<Tblcentrocosto> getTblcentrocostoList() {
        return tblcentrocostoList;
    }

    public void setTblcentrocostoList(List<Tblcentrocosto> tblcentrocostoList) {
        this.tblcentrocostoList = tblcentrocostoList;
    }

    public List<Tblconceptodeduccionretefuente> getTblconceptodeduccionretefuenteList() {
        return tblconceptodeduccionretefuenteList;
    }

    public void setTblconceptodeduccionretefuenteList(List<Tblconceptodeduccionretefuente> tblconceptodeduccionretefuenteList) {
        this.tblconceptodeduccionretefuenteList = tblconceptodeduccionretefuenteList;
    }

    public List<Tblconceptos> getTblconceptosList() {
        return tblconceptosList;
    }

    public void setTblconceptosList(List<Tblconceptos> tblconceptosList) {
        this.tblconceptosList = tblconceptosList;
    }

    public List<Tblfactoresprovision> getTblfactoresprovisionList() {
        return tblfactoresprovisionList;
    }

    public void setTblfactoresprovisionList(List<Tblfactoresprovision> tblfactoresprovisionList) {
        this.tblfactoresprovisionList = tblfactoresprovisionList;
    }

    public List<Tbltipoconceptos> getTbltipoconceptosList() {
        return tbltipoconceptosList;
    }

    public void setTbltipoconceptosList(List<Tbltipoconceptos> tbltipoconceptosList) {
        this.tbltipoconceptosList = tbltipoconceptosList;
    }

    public List<Tblprestamos> getTblprestamosList() {
        return tblprestamosList;
    }

    public void setTblprestamosList(List<Tblprestamos> tblprestamosList) {
        this.tblprestamosList = tblprestamosList;
    }

    public List<Tbltipoactividad> getTbltipoactividadList() {
        return tbltipoactividadList;
    }

    public void setTbltipoactividadList(List<Tbltipoactividad> tbltipoactividadList) {
        this.tbltipoactividadList = tbltipoactividadList;
    }

    public List<Tblconceptoagrupacion> getTblconceptoagrupacionList() {
        return tblconceptoagrupacionList;
    }

    public void setTblconceptoagrupacionList(List<Tblconceptoagrupacion> tblconceptoagrupacionList) {
        this.tblconceptoagrupacionList = tblconceptoagrupacionList;
    }

    public List<Tblagrupacion> getTblagrupacionList() {
        return tblagrupacionList;
    }

    public void setTblagrupacionList(List<Tblagrupacion> tblagrupacionList) {
        this.tblagrupacionList = tblagrupacionList;
    }

    public List<Tblcesantias> getTblcesantiasList() {
        return tblcesantiasList;
    }

    public void setTblcesantiasList(List<Tblcesantias> tblcesantiasList) {
        this.tblcesantiasList = tblcesantiasList;
    }

    public List<Tblparametroslegales> getTblparametroslegalesList() {
        return tblparametroslegalesList;
    }

    public void setTblparametroslegalesList(List<Tblparametroslegales> tblparametroslegalesList) {
        this.tblparametroslegalesList = tblparametroslegalesList;
    }

    public Tblperiodopago getPeriodoPago() {
        return periodoPago;
    }

    public void setPeriodoPago(Tblperiodopago periodoPago) {
        this.periodoPago = periodoPago;
    }

    public Tblpaises getPais() {
        return pais;
    }

    public void setPais(Tblpaises pais) {
        this.pais = pais;
    }

    public Tblimpuestos getImpuesto() {
        return impuesto;
    }

    public void setImpuesto(Tblimpuestos impuesto) {
        this.impuesto = impuesto;
    }

    public Tbldepartamentos getDepartamento() {
        return departamento;
    }

    public void setDepartamento(Tbldepartamentos departamento) {
        this.departamento = departamento;
    }

    public Tblciudades getCiudad() {
        return ciudad;
    }

    public void setCiudad(Tblciudades ciudad) {
        this.ciudad = ciudad;
    }

    public Tblbancos getBanco() {
        return banco;
    }

    public void setBanco(Tblbancos banco) {
        this.banco = banco;
    }

    public List<Tblclaseempleados> getTblclaseempleadosList() {
        return tblclaseempleadosList;
    }

    public void setTblclaseempleadosList(List<Tblclaseempleados> tblclaseempleadosList) {
        this.tblclaseempleadosList = tblclaseempleadosList;
    }

    public List<Tbltercero> getTblterceroList() {
        return tblterceroList;
    }

    public void setTblterceroList(List<Tbltercero> tblterceroList) {
        this.tblterceroList = tblterceroList;
    }

    public List<Tbldatospersonales> getTbldatospersonalesList() {
        return tbldatospersonalesList;
    }

    public void setTbldatospersonalesList(List<Tbldatospersonales> tbldatospersonalesList) {
        this.tbldatospersonalesList = tbldatospersonalesList;
    }

    public List<Tbltipoincapacidad> getTbltipoincapacidadList() {
        return tbltipoincapacidadList;
    }

    public void setTbltipoincapacidadList(List<Tbltipoincapacidad> tbltipoincapacidadList) {
        this.tbltipoincapacidadList = tbltipoincapacidadList;
    }

    public List<Tbleps> getTblepsList() {
        return tblepsList;
    }

    public void setTblepsList(List<Tbleps> tblepsList) {
        this.tblepsList = tblepsList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codCompania != null ? codCompania.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tblcompania)) {
            return false;
        }
        Tblcompania other = (Tblcompania) object;
        if ((this.codCompania == null && other.codCompania != null) || (this.codCompania != null && !this.codCompania.equals(other.codCompania))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "" + nomNomina + "";
    }
    
}
